package com.zdw.gateway.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zdw.gateway.entity.RoleEntity;
import com.zdw.gateway.mapper.RoleMapper;
import com.zdw.gateway.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 卓德文
 * @since 2023-01-04
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, RoleEntity> implements RoleService {

    /**
     * 根据ID查询用户角色
     *
     * @param id
     * @return
     */
    @Override
    public List<RoleEntity> selectRolesByUserId(Integer id) {
        return this.baseMapper.selectRolesByUserId(id);
    }
}
